<template>
    <div class="aside-menu">
        <el-container>
            <el-aside width="150px">
                <el-menu default-active="Stamp" @select="onSelect">
                    <el-menu-item index="Stamp">
                        <span>用章申请</span>
                    </el-menu-item>
                    <el-menu-item index="Down">
                        <span>资料下载申请</span>
                    </el-menu-item>
                    <el-menu-item index="Leave">
                        <span>请假单</span>
                    </el-menu-item>
                    <el-menu-item index="Suggest">
                        <span>合理化建议</span>
                    </el-menu-item>
                    <el-menu-item index="Other">
                        <span>通用报告申请</span>
                    </el-menu-item>
                </el-menu>
            </el-aside>
            <el-main>
                <component :is="Stamp" v-if="value == 'Stamp'" />
                <component :is="Down" v-if="value == 'Down'" />
                <component :is="Leave" v-if="value == 'Leave'" />
                <component :is="Suggest" v-if="value == 'Suggest'" />
                <component :is="Other" v-if="value == 'Other'" />
            </el-main>
        </el-container>
    </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import Stamp from '../apply/stamp.vue';
import Down from '../apply/down.vue';
import Leave from '../apply/leave.vue';
import Suggest from '../apply/suggest.vue';
import Other from '../apply/other.vue';
const value = ref('Down')
const onSelect = (data: any) => {
    value.value = data
}
</script>

<style scoped>

</style>